{extend name="personal/index" /}

  {block name="center"}
  <link href="static/css/password/common.css" rel="stylesheet" />
  <link href="static/css/password/safety.css" rel="stylesheet" />
  <link href="static/css/password/ui-dialog.css" rel="stylesheet" />



    <div class="personal-main userInfo fr" style="width:780px">
     <!-- 个人资料 start -->
     <div class="personal-module">
      <div class="ps-md-hd clearfix">
       <h6 class="ps-md-hd-tit fl">个人资料</h6>
      </div>
      <div class="ps-md-bd">
       <!-- 基本资料 start -->
       <div class="ui-tab">
        <div class="ui-tab-head">
         <div class="ui-tab-ctrl fl">
          <a href="indexPersonalZiliaoIndex" class="ui-tab-btn">基本资料</a>
          <a href="indexPersonalZiliaoPhoto" class="ui-tab-btn">修改头像</a>
          <a href="indexPersonalZiliaoPassword" class="ui-tab-btn">修改密码</a>
          <a href="indexPersonalZiliaoMibao" class="ui-tab-btn ui-tab-cur">密保问题</a>
         </div>
        </div>

     <!-- 修改登录密码 第一步 start -->
     <div class="personal-module">
      <div class="ps-md-hd clearfix">
       <h6 class="ps-md-hd-tit fl">设置密保问题</h6>
      </div>
      <div class="ps-md-bd">
       <div class="safety-form clearfix">
        <form id="form" action="indexPersonalZiliaoChangemibao" method="post" name="setLoginPasswordForm" onsubmit="return checkForm()" class="J-setLoginPasswordForm" novalidate="novalidate">
         <input type="hidden" name="uniq" id="uniq" value="{$userList['pwd']}" />
         <div class="safety-form-row clearfix">
          <div class="safety-form-label fl">
           请输入您的密码：
          </div>
          <div class="safety-form-span fl">
           <input type="password" name="pwd" id="oldPassword" onblur="checkOldpass()" class="input safety-form-email fl J-oldPassword" />
           <p class="form-error fl"></p>
          </div>
         </div>
         <div class="safety-form-row clearfix">
          <div class="safety-form-label fl">
           选择一个密保问题：
          </div>
          <div class="safety-form-span fl">
           <select name="question" id="select">
             <option value="你的手机号码是多少?">你的手机号码是多少?</option>
             <option value="你的QQ号码是多少?">你的QQ号码是多少?</option>
             <option value="你的微信号码是多少?">你的微信号码是多少?</option>
           </select>
           <p class="form-error fl"></p>
          </div>
         </div>
         <div class="safety-form-row clearfix">
          <div class="safety-form-label fl">
           请输入密保答案：
          </div>
          <div class="safety-form-span fl">
           <input type="text" name="answer" id="newPassword"  class="input safety-form-email fl J-password" data-element=".J-oldPassword" />
           <p class="form-error fl"></p>
          </div>
         </div>
         <div class="safety-form-row clearfix">
          <div class="safety-form-label fl">
           &nbsp;
          </div>
          <div class="safety-form-span fl">
           <span class="button-light-medium submitBtn">保存<button type="submit"></button></span>
          </div>
         </div>
        </form>
       </div>

      </div>
     </div>
     <!-- 修改登录密码 第一步 end -->

    </div>
    </div>
     <!-- 个人资料 end -->
    </div>
   </div>

  <script>
  
      function checkOldpass(){
            if ($('#oldPassword').val() !== $('#uniq').val()) {
                $('#oldPassword').next('p').html("* 密码不正确");
                return false;
            }else{
                $('#oldPassword').next('p').html("");
                return true;
            }
        }


      function checkForm(){
            return checkOldpass();
        }







  </script>



  {/block}